﻿@{
    ViewBag.Title = "InvoiceReportViewer";
}

<!doctype html>
<html lang="en">
<head runat="server">
    <title>Invoice Report Viewer</title>
    
    <script src="~/Scripts/codebase/dhtmlxcommon.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/Scripts/codebase/dhtmlxgrid.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/Scripts/codebase/dhtmlxgridcell.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/Scripts/codebase/ext/dhtmlxgrid_pgn.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/Scripts/codebase/ext/dhtmlxgrid_filter.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/Scripts/codebase/ext/dhtmlxgrid_export.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/Scripts/codebase/dhtmlxcalendar.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/Scripts/codebase/excells/dhtmlxgrid_excell_dhxcalendar.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/Scripts/codebase/dhtmlxtoolbar.js" type="text/javascript" charset="utf-8"></script>

    <link rel="stylesheet" href="~/Scripts/codebase/dhtmlxgrid.css" type="text/css" media="screen" charset="utf-8">
    <link rel="stylesheet" href="~/Scripts/codebase/skins/dhtmlxgrid_dhx_skyblue.css" type="text/css" media="screen" charset="utf-8">
    <link rel="stylesheet" href="~/Scripts/codebase/dhtmlxcalendar.css" type="text/css" media="screen" charset="utf-8">
    <link rel="stylesheet" href="~/Scripts/codebase/skins/dhtmlxcalendar_dhx_skyblue.css" type="text/css" media="screen" charset="utf-8">
    <link rel="stylesheet" href="~/Scripts/codebase/skins/dhtmlxtoolbar_dhx_skyblue.css" type="text/css" media="screen" charset="utf-8">
</head>
<body>
    <br />
    <div id="InvoiceGrid" style="width:1200px; height:400px;">
    </div>
    <div id="recinfoArea"></div>
    <br />
    <input type="button" name="save" value="save"
           onclick="grid.toExcel('@Url.Content("~/ExportExcel/ExportInvoiceGridToExcel")');">
    <script type="text/javascript" charset="utf-8">
        var grid = new dhtmlXGridObject("InvoiceGrid");
        grid.setImagePath("../Scripts/codebase/imgs/");
        grid.setHeader("Ref No, Invoice No, Quotation No, Description, WO No, PO # / DO #, Invoice Date, Amount (HKD), Is Received, Received Ref, Received Date");
        grid.setColAlign("center,center,center,justify,center,center,center,center,center,center,center")
        grid.attachHeader("#text_filter,#text_filter,#text_filter,,#text_filter,#text_filter,,,,#text_filter,");
        grid.setInitWidths("55,80,100,200,100,120,100,100,80,100,120");
        grid.setColTypes("ro,ro,ro,ro,ro,ro,dhxCalendar,price,ch,ed,dhxCalendar");
        grid.enablePaging(true, 10, 3, "recinfoArea");
        grid.setPagingSkin("toolbar", "dhx_skyblue");
        grid.enableColumnAutoSize(true);
        grid.enableMultiselect(true);
        grid.setSkin("dhx_skyblue");
        grid.init();
        grid.load("/Report/IDataViewer", "json");

    </script>

</body>
</html>
